﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
public class FormField : PartialTemplate
{
	[Browsable(true)]
	public string Label { get; set; }
	[Browsable(true)]
	public string Value { get; set; }
	[Browsable(true)]
	public string TestValue { get; set; }
	protected string TestingValue
	{
		get
		{
			bool testMode = ((PageTemplate)Page).IsTestMode;
			if (Value.IsNullOrEmpty()
				&& testMode
				&& TestValue.IsNotNullOrEmpty())
				return TestValue;
			else
				return string.Empty;
		}
	}
	protected string RequiredString
	{
		get
		{
			if (Classes.IsNotNullOrEmpty())
			{
				if (Classes.ToLower().Contains("required")) { return "*"; }
			}
			return string.Empty;
		}
	}
	[Browsable(true)]
	public string Classes
	{ get; set; }
	[Browsable(true)]
	public int Length { get; set; }
}